package main.java.observer;

/**
 * 观察者模式
 */
public class Demo {
    public static void main(String[] args) {
        SubscriptionSubject subject = new SubscriptionSubject();
        subject.attach(new WiexinUser("张三"));
        subject.attach(new WiexinUser("李四"));
        subject.attach(new WiexinUser("王五"));
        subject.attach(new WiexinUser("赵六"));

        subject.notify("更新了新的信息");

    }
}
